using UnityEngine;

public class StartGameMaster : MonoBehaviour
{
    public GameObject prefabGM;

    private void Start()
    {
        GameObject temp = GameObject.Find("GameMaster");
        if (temp == null)
        {
            GameObject gm = (GameObject)Instantiate(this.prefabGM);
            gm.name = "GameMaster";
            DontDestroyOnLoad(gm);
        }
        Destroy(gameObject);
    }
}